// 依赖实体类
const SafeString = require('../base/SafeString');
const SafeNumber = require('../base/SafeNumber');
const SafeDatetime = require('../base/SafeDatetime');

// 配置类
const config = require('../../config').config;

/**
 * 实体类 UpdateDevInfo 用于记录参数版本里每一个值的信息
 */
class UpdateDevInfo {
    constructor(obj) {
        this.id = new SafeNumber(obj.id).value;
        this.enzymeSolution = new SafeString(obj.enzymeSolution, 1, 50).value;
        this.disinfectant = new SafeString(obj.disinfectant, 1, 50).value;
        this.warrantyStartDate = new SafeDatetime(obj.warrantyStartDate).value;
        this.warrantyEndDate = new SafeDatetime(obj.warrantyEndDate).value;
    }
}

module.exports = UpdateDevInfo;